﻿using System;
using System.Data;
using System.Text;
using System.Data.SqlClient;
using Maticsoft.DBUtility;//Please add references
namespace Maticsoft.DAL
{
    /// <summary>
    /// 数据访问类:SO_SOMain
    /// </summary>
    public partial class SO_SOMain
    {
        public SO_SOMain()
        { }
        #region  BasicMethod

        /// <summary>
        /// 得到最大ID
        /// </summary>
        public int GetMaxId()
        {
            return DbHelperSQL.GetMaxID("ID", "SO_SOMain");
        }

        /// <summary>
        /// 是否存在该记录
        /// </summary>
        public bool Exists(int ID)
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append("select count(1) from SO_SOMain");
            strSql.Append(" where ID=@ID ");
            SqlParameter[] parameters = {
                    new SqlParameter("@ID", SqlDbType.Int,4)            };
            parameters[0].Value = ID;

            return DbHelperSQL.Exists(strSql.ToString(), parameters);
        }


        /// <summary>
        /// 增加一条数据
        /// </summary>
        public bool Add(Maticsoft.Model.SO_SOMain model)
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append("insert into SO_SOMain(");
            strSql.Append("cSTCode,dDate,cSOCode,cCusCode,cDepCode,cPersonCode,cSCCode,cCusOAddress,cPayCode,cexch_name,iExchRate,iTaxRate,iMoney,cMemo,iStatus,cMaker,cVerifier,cCloser,bDisFlag,cDefine1,cDefine2,cDefine3,cDefine4,cDefine5,cDefine6,cDefine7,cDefine8,cDefine9,cDefine10,bReturnFlag,cCusName,bOrder,ID,iVTid,cChanger,cBusType,cCreChpName,cDefine11,cDefine12,cDefine13,cDefine14,cDefine15,cDefine16,coppcode,cLocker,dPreMoDateBT,dPreDateBT,cgatheringplan,caddcode,iverifystate,ireturncount,iswfcontrolled,icreditstate,cmodifier,dmoddate,dverifydate,ccusperson,dcreatesystime,dverifysystime,dmodifysystime,iflowid,bcashsale,cgathingcode,cChangeVerifier,dChangeVerifyDate,dChangeVerifyTime,outid,ccuspersoncode,dclosedate,dclosesystime,iPrintCount,fbookratio,bmustbook,fbooksum,fbooknatsum,fgbooksum,fgbooknatsum,csvouchtype)");
            strSql.Append(" values (");
            strSql.Append("@cSTCode,@dDate,@cSOCode,@cCusCode,@cDepCode,@cPersonCode,@cSCCode,@cCusOAddress,@cPayCode,@cexch_name,@iExchRate,@iTaxRate,@iMoney,@cMemo,@iStatus,@cMaker,@cVerifier,@cCloser,@bDisFlag,@cDefine1,@cDefine2,@cDefine3,@cDefine4,@cDefine5,@cDefine6,@cDefine7,@cDefine8,@cDefine9,@cDefine10,@bReturnFlag,@cCusName,@bOrder,@ID,@iVTid,@cChanger,@cBusType,@cCreChpName,@cDefine11,@cDefine12,@cDefine13,@cDefine14,@cDefine15,@cDefine16,@coppcode,@cLocker,@dPreMoDateBT,@dPreDateBT,@cgatheringplan,@caddcode,@iverifystate,@ireturncount,@iswfcontrolled,@icreditstate,@cmodifier,@dmoddate,@dverifydate,@ccusperson,@dcreatesystime,@dverifysystime,@dmodifysystime,@iflowid,@bcashsale,@cgathingcode,@cChangeVerifier,@dChangeVerifyDate,@dChangeVerifyTime,@outid,@ccuspersoncode,@dclosedate,@dclosesystime,@iPrintCount,@fbookratio,@bmustbook,@fbooksum,@fbooknatsum,@fgbooksum,@fgbooknatsum,@csvouchtype)");
            SqlParameter[] parameters = {
                    new SqlParameter("@cSTCode", SqlDbType.NVarChar,2),
                    new SqlParameter("@dDate", SqlDbType.DateTime),
                    new SqlParameter("@cSOCode", SqlDbType.NVarChar,30),
                    new SqlParameter("@cCusCode", SqlDbType.NVarChar,20),
                    new SqlParameter("@cDepCode", SqlDbType.NVarChar,12),
                    new SqlParameter("@cPersonCode", SqlDbType.NVarChar,20),
                    new SqlParameter("@cSCCode", SqlDbType.NVarChar,2),
                    new SqlParameter("@cCusOAddress", SqlDbType.NVarChar,255),
                    new SqlParameter("@cPayCode", SqlDbType.NVarChar,3),
                    new SqlParameter("@cexch_name", SqlDbType.NVarChar,8),
                    new SqlParameter("@iExchRate", SqlDbType.Float,8),
                    new SqlParameter("@iTaxRate", SqlDbType.Float,8),
                    new SqlParameter("@iMoney", SqlDbType.Money,8),
                    new SqlParameter("@cMemo", SqlDbType.NVarChar,60),
                    new SqlParameter("@iStatus", SqlDbType.TinyInt,1),
                    new SqlParameter("@cMaker", SqlDbType.NVarChar,20),
                    new SqlParameter("@cVerifier", SqlDbType.NVarChar,20),
                    new SqlParameter("@cCloser", SqlDbType.NVarChar,20),
                    new SqlParameter("@bDisFlag", SqlDbType.Bit,1),
                    new SqlParameter("@cDefine1", SqlDbType.NVarChar,20),
                    new SqlParameter("@cDefine2", SqlDbType.NVarChar,20),
                    new SqlParameter("@cDefine3", SqlDbType.NVarChar,20),
                    new SqlParameter("@cDefine4", SqlDbType.DateTime),
                    new SqlParameter("@cDefine5", SqlDbType.Int,4),
                    new SqlParameter("@cDefine6", SqlDbType.DateTime),
                    new SqlParameter("@cDefine7", SqlDbType.Float,8),
                    new SqlParameter("@cDefine8", SqlDbType.NVarChar,4),
                    new SqlParameter("@cDefine9", SqlDbType.NVarChar,8),
                    new SqlParameter("@cDefine10", SqlDbType.NVarChar,60),
                    new SqlParameter("@bReturnFlag", SqlDbType.Bit,1),
                    new SqlParameter("@cCusName", SqlDbType.NVarChar,120),
                    new SqlParameter("@bOrder", SqlDbType.Bit,1),
                    new SqlParameter("@ID", SqlDbType.Int,4),
                    new SqlParameter("@iVTid", SqlDbType.Int,4),
                    new SqlParameter("@cChanger", SqlDbType.NVarChar,20),
                    new SqlParameter("@cBusType", SqlDbType.NVarChar,8),
                    new SqlParameter("@cCreChpName", SqlDbType.NVarChar,20),
                    new SqlParameter("@cDefine11", SqlDbType.NVarChar,120),
                    new SqlParameter("@cDefine12", SqlDbType.NVarChar,120),
                    new SqlParameter("@cDefine13", SqlDbType.NVarChar,120),
                    new SqlParameter("@cDefine14", SqlDbType.NVarChar,120),
                    new SqlParameter("@cDefine15", SqlDbType.Int,4),
                    new SqlParameter("@cDefine16", SqlDbType.Float,8),
                    new SqlParameter("@coppcode", SqlDbType.NVarChar,30),
                    new SqlParameter("@cLocker", SqlDbType.NVarChar,20),
                    new SqlParameter("@dPreMoDateBT", SqlDbType.DateTime),
                    new SqlParameter("@dPreDateBT", SqlDbType.DateTime),
                    new SqlParameter("@cgatheringplan", SqlDbType.NVarChar,20),
                    new SqlParameter("@caddcode", SqlDbType.NVarChar,30),
                    new SqlParameter("@iverifystate", SqlDbType.Int,4),
                    new SqlParameter("@ireturncount", SqlDbType.TinyInt,1),
                    new SqlParameter("@iswfcontrolled", SqlDbType.TinyInt,1),
                    new SqlParameter("@icreditstate", SqlDbType.VarChar,20),
                    new SqlParameter("@cmodifier", SqlDbType.NVarChar,20),
                    new SqlParameter("@dmoddate", SqlDbType.DateTime),
                    new SqlParameter("@dverifydate", SqlDbType.DateTime),
                    new SqlParameter("@ccusperson", SqlDbType.NVarChar,100),
                    new SqlParameter("@dcreatesystime", SqlDbType.DateTime),
                    new SqlParameter("@dverifysystime", SqlDbType.DateTime),
                    new SqlParameter("@dmodifysystime", SqlDbType.DateTime),
                    new SqlParameter("@iflowid", SqlDbType.Int,4),
                    new SqlParameter("@bcashsale", SqlDbType.Bit,1),
                    new SqlParameter("@cgathingcode", SqlDbType.NVarChar,255),
                    new SqlParameter("@cChangeVerifier", SqlDbType.NVarChar,20),
                    new SqlParameter("@dChangeVerifyDate", SqlDbType.DateTime),
                    new SqlParameter("@dChangeVerifyTime", SqlDbType.DateTime),
                    new SqlParameter("@outid", SqlDbType.UniqueIdentifier,16),
                    new SqlParameter("@ccuspersoncode", SqlDbType.NVarChar,30),
                    new SqlParameter("@dclosedate", SqlDbType.DateTime),
                    new SqlParameter("@dclosesystime", SqlDbType.DateTime),
                    new SqlParameter("@iPrintCount", SqlDbType.Float,8),
                    new SqlParameter("@fbookratio", SqlDbType.Float,8),
                    new SqlParameter("@bmustbook", SqlDbType.Bit,1),
                    new SqlParameter("@fbooksum", SqlDbType.Money,8),
                    new SqlParameter("@fbooknatsum", SqlDbType.Money,8),
                    new SqlParameter("@fgbooksum", SqlDbType.Money,8),
                    new SqlParameter("@fgbooknatsum", SqlDbType.Money,8),
                    new SqlParameter("@csvouchtype", SqlDbType.NVarChar,10)};
            parameters[0].Value = model.cSTCode;
            parameters[1].Value = model.dDate;
            parameters[2].Value = model.cSOCode;
            parameters[3].Value = model.cCusCode;
            parameters[4].Value = model.cDepCode;
            parameters[5].Value = model.cPersonCode;
            parameters[6].Value = model.cSCCode;
            parameters[7].Value = model.cCusOAddress;
            parameters[8].Value = model.cPayCode;
            parameters[9].Value = model.cexch_name;
            parameters[10].Value = model.iExchRate;
            parameters[11].Value = model.iTaxRate;
            parameters[12].Value = model.iMoney;
            parameters[13].Value = model.cMemo;
            parameters[14].Value = model.iStatus;
            parameters[15].Value = model.cMaker;
            parameters[16].Value = model.cVerifier;
            parameters[17].Value = model.cCloser;
            parameters[18].Value = model.bDisFlag;
            parameters[19].Value = model.cDefine1;
            parameters[20].Value = model.cDefine2;
            parameters[21].Value = model.cDefine3;
            parameters[22].Value = model.cDefine4;
            parameters[23].Value = model.cDefine5;
            parameters[24].Value = model.cDefine6;
            parameters[25].Value = model.cDefine7;
            parameters[26].Value = model.cDefine8;
            parameters[27].Value = model.cDefine9;
            parameters[28].Value = model.cDefine10;
            parameters[29].Value = model.bReturnFlag;
            parameters[30].Value = model.cCusName;
            parameters[31].Value = model.bOrder;
            parameters[32].Value = model.ID;
            parameters[33].Value = model.iVTid;
            parameters[34].Value = model.cChanger;
            parameters[35].Value = model.cBusType;
            parameters[36].Value = model.cCreChpName;
            parameters[37].Value = model.cDefine11;
            parameters[38].Value = model.cDefine12;
            parameters[39].Value = model.cDefine13;
            parameters[40].Value = model.cDefine14;
            parameters[41].Value = model.cDefine15;
            parameters[42].Value = model.cDefine16;
            parameters[43].Value = model.coppcode;
            parameters[44].Value = model.cLocker;
            parameters[45].Value = model.dPreMoDateBT;
            parameters[46].Value = model.dPreDateBT;
            parameters[47].Value = model.cgatheringplan;
            parameters[48].Value = model.caddcode;
            parameters[49].Value = model.iverifystate;
            parameters[50].Value = model.ireturncount;
            parameters[51].Value = model.iswfcontrolled;
            parameters[52].Value = model.icreditstate;
            parameters[53].Value = model.cmodifier;
            parameters[54].Value = model.dmoddate;
            parameters[55].Value = model.dverifydate;
            parameters[56].Value = model.ccusperson;
            parameters[57].Value = model.dcreatesystime;
            parameters[58].Value = model.dverifysystime;
            parameters[59].Value = model.dmodifysystime;
            parameters[60].Value = model.iflowid;
            parameters[61].Value = model.bcashsale;
            parameters[62].Value = model.cgathingcode;
            parameters[63].Value = model.cChangeVerifier;
            parameters[64].Value = model.dChangeVerifyDate;
            parameters[65].Value = model.dChangeVerifyTime;
            parameters[66].Value = Guid.NewGuid();
            parameters[67].Value = model.ccuspersoncode;
            parameters[68].Value = model.dclosedate;
            parameters[69].Value = model.dclosesystime;
            parameters[70].Value = model.iPrintCount;
            parameters[71].Value = model.fbookratio;
            parameters[72].Value = model.bmustbook;
            parameters[73].Value = model.fbooksum;
            parameters[74].Value = model.fbooknatsum;
            parameters[75].Value = model.fgbooksum;
            parameters[76].Value = model.fgbooknatsum;
            parameters[77].Value = model.csvouchtype;

            int rows = DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);
            if (rows > 0)
            {
                return true;
            }
            else
            {
                return false;
            }
        }
        /// <summary>
        /// 更新一条数据
        /// </summary>
        public bool Update(Maticsoft.Model.SO_SOMain model)
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append("update SO_SOMain set ");
            strSql.Append("cSTCode=@cSTCode,");
            strSql.Append("dDate=@dDate,");
            strSql.Append("cSOCode=@cSOCode,");
            strSql.Append("cCusCode=@cCusCode,");
            strSql.Append("cDepCode=@cDepCode,");
            strSql.Append("cPersonCode=@cPersonCode,");
            strSql.Append("cSCCode=@cSCCode,");
            strSql.Append("cCusOAddress=@cCusOAddress,");
            strSql.Append("cPayCode=@cPayCode,");
            strSql.Append("cexch_name=@cexch_name,");
            strSql.Append("iExchRate=@iExchRate,");
            strSql.Append("iTaxRate=@iTaxRate,");
            strSql.Append("iMoney=@iMoney,");
            strSql.Append("cMemo=@cMemo,");
            strSql.Append("iStatus=@iStatus,");
            strSql.Append("cMaker=@cMaker,");
            strSql.Append("cVerifier=@cVerifier,");
            strSql.Append("cCloser=@cCloser,");
            strSql.Append("bDisFlag=@bDisFlag,");
            strSql.Append("cDefine1=@cDefine1,");
            strSql.Append("cDefine2=@cDefine2,");
            strSql.Append("cDefine3=@cDefine3,");
            strSql.Append("cDefine4=@cDefine4,");
            strSql.Append("cDefine5=@cDefine5,");
            strSql.Append("cDefine6=@cDefine6,");
            strSql.Append("cDefine7=@cDefine7,");
            strSql.Append("cDefine8=@cDefine8,");
            strSql.Append("cDefine9=@cDefine9,");
            strSql.Append("cDefine10=@cDefine10,");
            strSql.Append("bReturnFlag=@bReturnFlag,");
            strSql.Append("cCusName=@cCusName,");
            strSql.Append("bOrder=@bOrder,");
            strSql.Append("iVTid=@iVTid,");
            strSql.Append("cChanger=@cChanger,");
            strSql.Append("cBusType=@cBusType,");
            strSql.Append("cCreChpName=@cCreChpName,");
            strSql.Append("cDefine11=@cDefine11,");
            strSql.Append("cDefine12=@cDefine12,");
            strSql.Append("cDefine13=@cDefine13,");
            strSql.Append("cDefine14=@cDefine14,");
            strSql.Append("cDefine15=@cDefine15,");
            strSql.Append("cDefine16=@cDefine16,");
            strSql.Append("coppcode=@coppcode,");
            strSql.Append("cLocker=@cLocker,");
            strSql.Append("dPreMoDateBT=@dPreMoDateBT,");
            strSql.Append("dPreDateBT=@dPreDateBT,");
            strSql.Append("cgatheringplan=@cgatheringplan,");
            strSql.Append("caddcode=@caddcode,");
            strSql.Append("iverifystate=@iverifystate,");
            strSql.Append("ireturncount=@ireturncount,");
            strSql.Append("iswfcontrolled=@iswfcontrolled,");
            strSql.Append("icreditstate=@icreditstate,");
            strSql.Append("cmodifier=@cmodifier,");
            strSql.Append("dmoddate=@dmoddate,");
            strSql.Append("dverifydate=@dverifydate,");
            strSql.Append("ccusperson=@ccusperson,");
            strSql.Append("dcreatesystime=@dcreatesystime,");
            strSql.Append("dverifysystime=@dverifysystime,");
            strSql.Append("dmodifysystime=@dmodifysystime,");
            strSql.Append("iflowid=@iflowid,");
            strSql.Append("bcashsale=@bcashsale,");
            strSql.Append("cgathingcode=@cgathingcode,");
            strSql.Append("cChangeVerifier=@cChangeVerifier,");
            strSql.Append("dChangeVerifyDate=@dChangeVerifyDate,");
            strSql.Append("dChangeVerifyTime=@dChangeVerifyTime,");
            strSql.Append("outid=@outid,");
            strSql.Append("ccuspersoncode=@ccuspersoncode,");
            strSql.Append("dclosedate=@dclosedate,");
            strSql.Append("dclosesystime=@dclosesystime,");
            strSql.Append("iPrintCount=@iPrintCount,");
            strSql.Append("fbookratio=@fbookratio,");
            strSql.Append("bmustbook=@bmustbook,");
            strSql.Append("fbooksum=@fbooksum,");
            strSql.Append("fbooknatsum=@fbooknatsum,");
            strSql.Append("fgbooksum=@fgbooksum,");
            strSql.Append("fgbooknatsum=@fgbooknatsum,");
            strSql.Append("csvouchtype=@csvouchtype");
            strSql.Append(" where ID=@ID ");
            SqlParameter[] parameters = {
                    new SqlParameter("@cSTCode", SqlDbType.NVarChar,2),
                    new SqlParameter("@dDate", SqlDbType.DateTime),
                    new SqlParameter("@cSOCode", SqlDbType.NVarChar,30),
                    new SqlParameter("@cCusCode", SqlDbType.NVarChar,20),
                    new SqlParameter("@cDepCode", SqlDbType.NVarChar,12),
                    new SqlParameter("@cPersonCode", SqlDbType.NVarChar,20),
                    new SqlParameter("@cSCCode", SqlDbType.NVarChar,2),
                    new SqlParameter("@cCusOAddress", SqlDbType.NVarChar,255),
                    new SqlParameter("@cPayCode", SqlDbType.NVarChar,3),
                    new SqlParameter("@cexch_name", SqlDbType.NVarChar,8),
                    new SqlParameter("@iExchRate", SqlDbType.Float,8),
                    new SqlParameter("@iTaxRate", SqlDbType.Float,8),
                    new SqlParameter("@iMoney", SqlDbType.Money,8),
                    new SqlParameter("@cMemo", SqlDbType.NVarChar,60),
                    new SqlParameter("@iStatus", SqlDbType.TinyInt,1),
                    new SqlParameter("@cMaker", SqlDbType.NVarChar,20),
                    new SqlParameter("@cVerifier", SqlDbType.NVarChar,20),
                    new SqlParameter("@cCloser", SqlDbType.NVarChar,20),
                    new SqlParameter("@bDisFlag", SqlDbType.Bit,1),
                    new SqlParameter("@cDefine1", SqlDbType.NVarChar,20),
                    new SqlParameter("@cDefine2", SqlDbType.NVarChar,20),
                    new SqlParameter("@cDefine3", SqlDbType.NVarChar,20),
                    new SqlParameter("@cDefine4", SqlDbType.DateTime),
                    new SqlParameter("@cDefine5", SqlDbType.Int,4),
                    new SqlParameter("@cDefine6", SqlDbType.DateTime),
                    new SqlParameter("@cDefine7", SqlDbType.Float,8),
                    new SqlParameter("@cDefine8", SqlDbType.NVarChar,4),
                    new SqlParameter("@cDefine9", SqlDbType.NVarChar,8),
                    new SqlParameter("@cDefine10", SqlDbType.NVarChar,60),
                    new SqlParameter("@bReturnFlag", SqlDbType.Bit,1),
                    new SqlParameter("@cCusName", SqlDbType.NVarChar,120),
                    new SqlParameter("@bOrder", SqlDbType.Bit,1),
                    new SqlParameter("@iVTid", SqlDbType.Int,4),
                    new SqlParameter("@cChanger", SqlDbType.NVarChar,20),
                    new SqlParameter("@cBusType", SqlDbType.NVarChar,8),
                    new SqlParameter("@cCreChpName", SqlDbType.NVarChar,20),
                    new SqlParameter("@cDefine11", SqlDbType.NVarChar,120),
                    new SqlParameter("@cDefine12", SqlDbType.NVarChar,120),
                    new SqlParameter("@cDefine13", SqlDbType.NVarChar,120),
                    new SqlParameter("@cDefine14", SqlDbType.NVarChar,120),
                    new SqlParameter("@cDefine15", SqlDbType.Int,4),
                    new SqlParameter("@cDefine16", SqlDbType.Float,8),
                    new SqlParameter("@coppcode", SqlDbType.NVarChar,30),
                    new SqlParameter("@cLocker", SqlDbType.NVarChar,20),
                    new SqlParameter("@dPreMoDateBT", SqlDbType.DateTime),
                    new SqlParameter("@dPreDateBT", SqlDbType.DateTime),
                    new SqlParameter("@cgatheringplan", SqlDbType.NVarChar,20),
                    new SqlParameter("@caddcode", SqlDbType.NVarChar,30),
                    new SqlParameter("@iverifystate", SqlDbType.Int,4),
                    new SqlParameter("@ireturncount", SqlDbType.TinyInt,1),
                    new SqlParameter("@iswfcontrolled", SqlDbType.TinyInt,1),
                    new SqlParameter("@icreditstate", SqlDbType.VarChar,20),
                    new SqlParameter("@cmodifier", SqlDbType.NVarChar,20),
                    new SqlParameter("@dmoddate", SqlDbType.DateTime),
                    new SqlParameter("@dverifydate", SqlDbType.DateTime),
                    new SqlParameter("@ccusperson", SqlDbType.NVarChar,100),
                    new SqlParameter("@dcreatesystime", SqlDbType.DateTime),
                    new SqlParameter("@dverifysystime", SqlDbType.DateTime),
                    new SqlParameter("@dmodifysystime", SqlDbType.DateTime),
                    new SqlParameter("@iflowid", SqlDbType.Int,4),
                    new SqlParameter("@bcashsale", SqlDbType.Bit,1),
                    new SqlParameter("@cgathingcode", SqlDbType.NVarChar,255),
                    new SqlParameter("@cChangeVerifier", SqlDbType.NVarChar,20),
                    new SqlParameter("@dChangeVerifyDate", SqlDbType.DateTime),
                    new SqlParameter("@dChangeVerifyTime", SqlDbType.DateTime),
                    new SqlParameter("@outid", SqlDbType.UniqueIdentifier,16),
                    new SqlParameter("@ccuspersoncode", SqlDbType.NVarChar,30),
                    new SqlParameter("@dclosedate", SqlDbType.DateTime),
                    new SqlParameter("@dclosesystime", SqlDbType.DateTime),
                    new SqlParameter("@iPrintCount", SqlDbType.Float,8),
                    new SqlParameter("@fbookratio", SqlDbType.Float,8),
                    new SqlParameter("@bmustbook", SqlDbType.Bit,1),
                    new SqlParameter("@fbooksum", SqlDbType.Money,8),
                    new SqlParameter("@fbooknatsum", SqlDbType.Money,8),
                    new SqlParameter("@fgbooksum", SqlDbType.Money,8),
                    new SqlParameter("@fgbooknatsum", SqlDbType.Money,8),
                    new SqlParameter("@csvouchtype", SqlDbType.NVarChar,10),
                    new SqlParameter("@ID", SqlDbType.Int,4)};
            parameters[0].Value = model.cSTCode;
            parameters[1].Value = model.dDate;
            parameters[2].Value = model.cSOCode;
            parameters[3].Value = model.cCusCode;
            parameters[4].Value = model.cDepCode;
            parameters[5].Value = model.cPersonCode;
            parameters[6].Value = model.cSCCode;
            parameters[7].Value = model.cCusOAddress;
            parameters[8].Value = model.cPayCode;
            parameters[9].Value = model.cexch_name;
            parameters[10].Value = model.iExchRate;
            parameters[11].Value = model.iTaxRate;
            parameters[12].Value = model.iMoney;
            parameters[13].Value = model.cMemo;
            parameters[14].Value = model.iStatus;
            parameters[15].Value = model.cMaker;
            parameters[16].Value = model.cVerifier;
            parameters[17].Value = model.cCloser;
            parameters[18].Value = model.bDisFlag;
            parameters[19].Value = model.cDefine1;
            parameters[20].Value = model.cDefine2;
            parameters[21].Value = model.cDefine3;
            parameters[22].Value = model.cDefine4;
            parameters[23].Value = model.cDefine5;
            parameters[24].Value = model.cDefine6;
            parameters[25].Value = model.cDefine7;
            parameters[26].Value = model.cDefine8;
            parameters[27].Value = model.cDefine9;
            parameters[28].Value = model.cDefine10;
            parameters[29].Value = model.bReturnFlag;
            parameters[30].Value = model.cCusName;
            parameters[31].Value = model.bOrder;
            parameters[32].Value = model.iVTid;
            parameters[33].Value = model.cChanger;
            parameters[34].Value = model.cBusType;
            parameters[35].Value = model.cCreChpName;
            parameters[36].Value = model.cDefine11;
            parameters[37].Value = model.cDefine12;
            parameters[38].Value = model.cDefine13;
            parameters[39].Value = model.cDefine14;
            parameters[40].Value = model.cDefine15;
            parameters[41].Value = model.cDefine16;
            parameters[42].Value = model.coppcode;
            parameters[43].Value = model.cLocker;
            parameters[44].Value = model.dPreMoDateBT;
            parameters[45].Value = model.dPreDateBT;
            parameters[46].Value = model.cgatheringplan;
            parameters[47].Value = model.caddcode;
            parameters[48].Value = model.iverifystate;
            parameters[49].Value = model.ireturncount;
            parameters[50].Value = model.iswfcontrolled;
            parameters[51].Value = model.icreditstate;
            parameters[52].Value = model.cmodifier;
            parameters[53].Value = model.dmoddate;
            parameters[54].Value = model.dverifydate;
            parameters[55].Value = model.ccusperson;
            parameters[56].Value = model.dcreatesystime;
            parameters[57].Value = model.dverifysystime;
            parameters[58].Value = model.dmodifysystime;
            parameters[59].Value = model.iflowid;
            parameters[60].Value = model.bcashsale;
            parameters[61].Value = model.cgathingcode;
            parameters[62].Value = model.cChangeVerifier;
            parameters[63].Value = model.dChangeVerifyDate;
            parameters[64].Value = model.dChangeVerifyTime;
            parameters[65].Value = model.outid;
            parameters[66].Value = model.ccuspersoncode;
            parameters[67].Value = model.dclosedate;
            parameters[68].Value = model.dclosesystime;
            parameters[69].Value = model.iPrintCount;
            parameters[70].Value = model.fbookratio;
            parameters[71].Value = model.bmustbook;
            parameters[72].Value = model.fbooksum;
            parameters[73].Value = model.fbooknatsum;
            parameters[74].Value = model.fgbooksum;
            parameters[75].Value = model.fgbooknatsum;
            parameters[76].Value = model.csvouchtype;
            parameters[77].Value = model.ID;

            int rows = DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);
            if (rows > 0)
            {
                return true;
            }
            else
            {
                return false;
            }
        }

        /// <summary>
        /// 删除一条数据
        /// </summary>
        public bool Delete(int ID)
        {

            StringBuilder strSql = new StringBuilder();
            strSql.Append("delete from SO_SOMain ");
            strSql.Append(" where ID=@ID ");
            SqlParameter[] parameters = {
                    new SqlParameter("@ID", SqlDbType.Int,4)            };
            parameters[0].Value = ID;

            int rows = DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);
            if (rows > 0)
            {
                return true;
            }
            else
            {
                return false;
            }
        }
        /// <summary>
        /// 批量删除数据
        /// </summary>
        public bool DeleteList(string IDlist)
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append("delete from SO_SOMain ");
            strSql.Append(" where ID in (" + IDlist + ")  ");
            int rows = DbHelperSQL.ExecuteSql(strSql.ToString());
            if (rows > 0)
            {
                return true;
            }
            else
            {
                return false;
            }
        }


        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public Maticsoft.Model.SO_SOMain GetModel(int ID)
        {

            StringBuilder strSql = new StringBuilder();
            strSql.Append("select  top 1 cSTCode,dDate,cSOCode,cCusCode,cDepCode,cPersonCode,cSCCode,cCusOAddress,cPayCode,cexch_name,iExchRate,iTaxRate,iMoney,cMemo,iStatus,cMaker,cVerifier,cCloser,bDisFlag,cDefine1,cDefine2,cDefine3,cDefine4,cDefine5,cDefine6,cDefine7,cDefine8,cDefine9,cDefine10,bReturnFlag,cCusName,bOrder,ID,iVTid,cChanger,cBusType,cCreChpName,cDefine11,cDefine12,cDefine13,cDefine14,cDefine15,cDefine16,coppcode,cLocker,dPreMoDateBT,dPreDateBT,cgatheringplan,caddcode,iverifystate,ireturncount,iswfcontrolled,icreditstate,cmodifier,dmoddate,dverifydate,ccusperson,dcreatesystime,dverifysystime,dmodifysystime,iflowid,bcashsale,cgathingcode,cChangeVerifier,dChangeVerifyDate,dChangeVerifyTime,outid,ccuspersoncode,dclosedate,dclosesystime,iPrintCount,fbookratio,bmustbook,fbooksum,fbooknatsum,fgbooksum,fgbooknatsum,csvouchtype from SO_SOMain ");
            strSql.Append(" where ID=@ID ");
            SqlParameter[] parameters = {
                    new SqlParameter("@ID", SqlDbType.Int,4)            };
            parameters[0].Value = ID;

            Maticsoft.Model.SO_SOMain model = new Maticsoft.Model.SO_SOMain();
            DataSet ds = DbHelperSQL.Query(strSql.ToString(), parameters);
            if (ds.Tables[0].Rows.Count > 0)
            {
                return DataRowToModel(ds.Tables[0].Rows[0]);
            }
            else
            {
                return null;
            }
        }


        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public Maticsoft.Model.SO_SOMain DataRowToModel(DataRow row)
        {
            Maticsoft.Model.SO_SOMain model = new Maticsoft.Model.SO_SOMain();
            if (row != null)
            {
                if (row["cSTCode"] != null)
                {
                    model.cSTCode = row["cSTCode"].ToString();
                }
                if (row["dDate"] != null && row["dDate"].ToString() != "")
                {
                    model.dDate = DateTime.Parse(row["dDate"].ToString());
                }
                if (row["cSOCode"] != null)
                {
                    model.cSOCode = row["cSOCode"].ToString();
                }
                if (row["cCusCode"] != null)
                {
                    model.cCusCode = row["cCusCode"].ToString();
                }
                if (row["cDepCode"] != null)
                {
                    model.cDepCode = row["cDepCode"].ToString();
                }
                if (row["cPersonCode"] != null)
                {
                    model.cPersonCode = row["cPersonCode"].ToString();
                }
                if (row["cSCCode"] != null)
                {
                    model.cSCCode = row["cSCCode"].ToString();
                }
                if (row["cCusOAddress"] != null)
                {
                    model.cCusOAddress = row["cCusOAddress"].ToString();
                }
                if (row["cPayCode"] != null)
                {
                    model.cPayCode = row["cPayCode"].ToString();
                }
                if (row["cexch_name"] != null)
                {
                    model.cexch_name = row["cexch_name"].ToString();
                }
                if (row["iExchRate"] != null && row["iExchRate"].ToString() != "")
                {
                    model.iExchRate = decimal.Parse(row["iExchRate"].ToString());
                }
                if (row["iTaxRate"] != null && row["iTaxRate"].ToString() != "")
                {
                    model.iTaxRate = decimal.Parse(row["iTaxRate"].ToString());
                }
                if (row["iMoney"] != null && row["iMoney"].ToString() != "")
                {
                    model.iMoney = decimal.Parse(row["iMoney"].ToString());
                }
                if (row["cMemo"] != null)
                {
                    model.cMemo = row["cMemo"].ToString();
                }
                if (row["iStatus"] != null && row["iStatus"].ToString() != "")
                {
                    model.iStatus = int.Parse(row["iStatus"].ToString());
                }
                if (row["cMaker"] != null)
                {
                    model.cMaker = row["cMaker"].ToString();
                }
                if (row["cVerifier"] != null)
                {
                    model.cVerifier = row["cVerifier"].ToString();
                }
                if (row["cCloser"] != null)
                {
                    model.cCloser = row["cCloser"].ToString();
                }
                if (row["bDisFlag"] != null && row["bDisFlag"].ToString() != "")
                {
                    if ((row["bDisFlag"].ToString() == "1") || (row["bDisFlag"].ToString().ToLower() == "true"))
                    {
                        model.bDisFlag = true;
                    }
                    else
                    {
                        model.bDisFlag = false;
                    }
                }
                if (row["cDefine1"] != null)
                {
                    model.cDefine1 = row["cDefine1"].ToString();
                }
                if (row["cDefine2"] != null)
                {
                    model.cDefine2 = row["cDefine2"].ToString();
                }
                if (row["cDefine3"] != null)
                {
                    model.cDefine3 = row["cDefine3"].ToString();
                }
                if (row["cDefine4"] != null && row["cDefine4"].ToString() != "")
                {
                    model.cDefine4 = DateTime.Parse(row["cDefine4"].ToString());
                }
                if (row["cDefine5"] != null && row["cDefine5"].ToString() != "")
                {
                    model.cDefine5 = int.Parse(row["cDefine5"].ToString());
                }
                if (row["cDefine6"] != null && row["cDefine6"].ToString() != "")
                {
                    model.cDefine6 = DateTime.Parse(row["cDefine6"].ToString());
                }
                if (row["cDefine7"] != null && row["cDefine7"].ToString() != "")
                {
                    model.cDefine7 = decimal.Parse(row["cDefine7"].ToString());
                }
                if (row["cDefine8"] != null)
                {
                    model.cDefine8 = row["cDefine8"].ToString();
                }
                if (row["cDefine9"] != null)
                {
                    model.cDefine9 = row["cDefine9"].ToString();
                }
                if (row["cDefine10"] != null)
                {
                    model.cDefine10 = row["cDefine10"].ToString();
                }
                if (row["bReturnFlag"] != null && row["bReturnFlag"].ToString() != "")
                {
                    if ((row["bReturnFlag"].ToString() == "1") || (row["bReturnFlag"].ToString().ToLower() == "true"))
                    {
                        model.bReturnFlag = true;
                    }
                    else
                    {
                        model.bReturnFlag = false;
                    }
                }
                if (row["cCusName"] != null)
                {
                    model.cCusName = row["cCusName"].ToString();
                }
                if (row["bOrder"] != null && row["bOrder"].ToString() != "")
                {
                    if ((row["bOrder"].ToString() == "1") || (row["bOrder"].ToString().ToLower() == "true"))
                    {
                        model.bOrder = true;
                    }
                    else
                    {
                        model.bOrder = false;
                    }
                }
                if (row["ID"] != null && row["ID"].ToString() != "")
                {
                    model.ID = int.Parse(row["ID"].ToString());
                }
                if (row["iVTid"] != null && row["iVTid"].ToString() != "")
                {
                    model.iVTid = int.Parse(row["iVTid"].ToString());
                }
                if (row["cChanger"] != null)
                {
                    model.cChanger = row["cChanger"].ToString();
                }
                if (row["cBusType"] != null)
                {
                    model.cBusType = row["cBusType"].ToString();
                }
                if (row["cCreChpName"] != null)
                {
                    model.cCreChpName = row["cCreChpName"].ToString();
                }
                if (row["cDefine11"] != null)
                {
                    model.cDefine11 = row["cDefine11"].ToString();
                }
                if (row["cDefine12"] != null)
                {
                    model.cDefine12 = row["cDefine12"].ToString();
                }
                if (row["cDefine13"] != null)
                {
                    model.cDefine13 = row["cDefine13"].ToString();
                }
                if (row["cDefine14"] != null)
                {
                    model.cDefine14 = row["cDefine14"].ToString();
                }
                if (row["cDefine15"] != null && row["cDefine15"].ToString() != "")
                {
                    model.cDefine15 = int.Parse(row["cDefine15"].ToString());
                }
                if (row["cDefine16"] != null && row["cDefine16"].ToString() != "")
                {
                    model.cDefine16 = decimal.Parse(row["cDefine16"].ToString());
                }
                if (row["coppcode"] != null)
                {
                    model.coppcode = row["coppcode"].ToString();
                }
                if (row["cLocker"] != null)
                {
                    model.cLocker = row["cLocker"].ToString();
                }
                if (row["dPreMoDateBT"] != null && row["dPreMoDateBT"].ToString() != "")
                {
                    model.dPreMoDateBT = DateTime.Parse(row["dPreMoDateBT"].ToString());
                }
                if (row["dPreDateBT"] != null && row["dPreDateBT"].ToString() != "")
                {
                    model.dPreDateBT = DateTime.Parse(row["dPreDateBT"].ToString());
                }
                if (row["cgatheringplan"] != null)
                {
                    model.cgatheringplan = row["cgatheringplan"].ToString();
                }
                if (row["caddcode"] != null)
                {
                    model.caddcode = row["caddcode"].ToString();
                }
                if (row["iverifystate"] != null && row["iverifystate"].ToString() != "")
                {
                    model.iverifystate = int.Parse(row["iverifystate"].ToString());
                }
                if (row["ireturncount"] != null && row["ireturncount"].ToString() != "")
                {
                    model.ireturncount = int.Parse(row["ireturncount"].ToString());
                }
                if (row["iswfcontrolled"] != null && row["iswfcontrolled"].ToString() != "")
                {
                    model.iswfcontrolled = int.Parse(row["iswfcontrolled"].ToString());
                }
                if (row["icreditstate"] != null)
                {
                    model.icreditstate = row["icreditstate"].ToString();
                }
                if (row["cmodifier"] != null)
                {
                    model.cmodifier = row["cmodifier"].ToString();
                }
                if (row["dmoddate"] != null && row["dmoddate"].ToString() != "")
                {
                    model.dmoddate = DateTime.Parse(row["dmoddate"].ToString());
                }
                if (row["dverifydate"] != null && row["dverifydate"].ToString() != "")
                {
                    model.dverifydate = DateTime.Parse(row["dverifydate"].ToString());
                }
                if (row["ccusperson"] != null)
                {
                    model.ccusperson = row["ccusperson"].ToString();
                }
                if (row["dcreatesystime"] != null && row["dcreatesystime"].ToString() != "")
                {
                    model.dcreatesystime = DateTime.Parse(row["dcreatesystime"].ToString());
                }
                if (row["dverifysystime"] != null && row["dverifysystime"].ToString() != "")
                {
                    model.dverifysystime = DateTime.Parse(row["dverifysystime"].ToString());
                }
                if (row["dmodifysystime"] != null && row["dmodifysystime"].ToString() != "")
                {
                    model.dmodifysystime = DateTime.Parse(row["dmodifysystime"].ToString());
                }
                if (row["iflowid"] != null && row["iflowid"].ToString() != "")
                {
                    model.iflowid = int.Parse(row["iflowid"].ToString());
                }
                if (row["bcashsale"] != null && row["bcashsale"].ToString() != "")
                {
                    if ((row["bcashsale"].ToString() == "1") || (row["bcashsale"].ToString().ToLower() == "true"))
                    {
                        model.bcashsale = true;
                    }
                    else
                    {
                        model.bcashsale = false;
                    }
                }
                if (row["cgathingcode"] != null)
                {
                    model.cgathingcode = row["cgathingcode"].ToString();
                }
                if (row["cChangeVerifier"] != null)
                {
                    model.cChangeVerifier = row["cChangeVerifier"].ToString();
                }
                if (row["dChangeVerifyDate"] != null && row["dChangeVerifyDate"].ToString() != "")
                {
                    model.dChangeVerifyDate = DateTime.Parse(row["dChangeVerifyDate"].ToString());
                }
                if (row["dChangeVerifyTime"] != null && row["dChangeVerifyTime"].ToString() != "")
                {
                    model.dChangeVerifyTime = DateTime.Parse(row["dChangeVerifyTime"].ToString());
                }
                if (row["outid"] != null && row["outid"].ToString() != "")
                {
                    model.outid = new Guid(row["outid"].ToString());
                }
                if (row["ccuspersoncode"] != null)
                {
                    model.ccuspersoncode = row["ccuspersoncode"].ToString();
                }
                if (row["dclosedate"] != null && row["dclosedate"].ToString() != "")
                {
                    model.dclosedate = DateTime.Parse(row["dclosedate"].ToString());
                }
                if (row["dclosesystime"] != null && row["dclosesystime"].ToString() != "")
                {
                    model.dclosesystime = DateTime.Parse(row["dclosesystime"].ToString());
                }
                if (row["iPrintCount"] != null && row["iPrintCount"].ToString() != "")
                {
                    model.iPrintCount = decimal.Parse(row["iPrintCount"].ToString());
                }
                if (row["fbookratio"] != null && row["fbookratio"].ToString() != "")
                {
                    model.fbookratio = decimal.Parse(row["fbookratio"].ToString());
                }
                if (row["bmustbook"] != null && row["bmustbook"].ToString() != "")
                {
                    if ((row["bmustbook"].ToString() == "1") || (row["bmustbook"].ToString().ToLower() == "true"))
                    {
                        model.bmustbook = true;
                    }
                    else
                    {
                        model.bmustbook = false;
                    }
                }
                if (row["fbooksum"] != null && row["fbooksum"].ToString() != "")
                {
                    model.fbooksum = decimal.Parse(row["fbooksum"].ToString());
                }
                if (row["fbooknatsum"] != null && row["fbooknatsum"].ToString() != "")
                {
                    model.fbooknatsum = decimal.Parse(row["fbooknatsum"].ToString());
                }
                if (row["fgbooksum"] != null && row["fgbooksum"].ToString() != "")
                {
                    model.fgbooksum = decimal.Parse(row["fgbooksum"].ToString());
                }
                if (row["fgbooknatsum"] != null && row["fgbooknatsum"].ToString() != "")
                {
                    model.fgbooknatsum = decimal.Parse(row["fgbooknatsum"].ToString());
                }
                if (row["csvouchtype"] != null)
                {
                    model.csvouchtype = row["csvouchtype"].ToString();
                }
            }
            return model;
        }

        /// <summary>
        /// 获得数据列表
        /// </summary>
        public DataSet GetList(string strWhere)
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append("select cSTCode,dDate,cSOCode,cCusCode,cDepCode,cPersonCode,cSCCode,cCusOAddress,cPayCode,cexch_name,iExchRate,iTaxRate,iMoney,cMemo,iStatus,cMaker,cVerifier,cCloser,bDisFlag,cDefine1,cDefine2,cDefine3,cDefine4,cDefine5,cDefine6,cDefine7,cDefine8,cDefine9,cDefine10,bReturnFlag,cCusName,bOrder,ID,iVTid,cChanger,cBusType,cCreChpName,cDefine11,cDefine12,cDefine13,cDefine14,cDefine15,cDefine16,coppcode,cLocker,dPreMoDateBT,dPreDateBT,cgatheringplan,caddcode,iverifystate,ireturncount,iswfcontrolled,icreditstate,cmodifier,dmoddate,dverifydate,ccusperson,dcreatesystime,dverifysystime,dmodifysystime,iflowid,bcashsale,cgathingcode,cChangeVerifier,dChangeVerifyDate,dChangeVerifyTime,outid,ccuspersoncode,dclosedate,dclosesystime,iPrintCount,fbookratio,bmustbook,fbooksum,fbooknatsum,fgbooksum,fgbooknatsum,csvouchtype ");
            strSql.Append(" FROM SO_SOMain ");
            if (strWhere.Trim() != "")
            {
                strSql.Append(" where " + strWhere);
            }
            return DbHelperSQL.Query(strSql.ToString());
        }

        /// <summary>
        /// 获得前几行数据
        /// </summary>
        public DataSet GetList(int Top, string strWhere, string filedOrder)
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append("select ");
            if (Top > 0)
            {
                strSql.Append(" top " + Top.ToString());
            }
            strSql.Append(" cSTCode,dDate,cSOCode,cCusCode,cDepCode,cPersonCode,cSCCode,cCusOAddress,cPayCode,cexch_name,iExchRate,iTaxRate,iMoney,cMemo,iStatus,cMaker,cVerifier,cCloser,bDisFlag,cDefine1,cDefine2,cDefine3,cDefine4,cDefine5,cDefine6,cDefine7,cDefine8,cDefine9,cDefine10,bReturnFlag,cCusName,bOrder,ID,iVTid,cChanger,cBusType,cCreChpName,cDefine11,cDefine12,cDefine13,cDefine14,cDefine15,cDefine16,coppcode,cLocker,dPreMoDateBT,dPreDateBT,cgatheringplan,caddcode,iverifystate,ireturncount,iswfcontrolled,icreditstate,cmodifier,dmoddate,dverifydate,ccusperson,dcreatesystime,dverifysystime,dmodifysystime,iflowid,bcashsale,cgathingcode,cChangeVerifier,dChangeVerifyDate,dChangeVerifyTime,outid,ccuspersoncode,dclosedate,dclosesystime,iPrintCount,fbookratio,bmustbook,fbooksum,fbooknatsum,fgbooksum,fgbooknatsum,csvouchtype ");
            strSql.Append(" FROM SO_SOMain ");
            if (strWhere.Trim() != "")
            {
                strSql.Append(" where " + strWhere);
            }
            strSql.Append(" order by " + filedOrder);
            return DbHelperSQL.Query(strSql.ToString());
        }

        /// <summary>
        /// 获取记录总数
        /// </summary>
        public int GetRecordCount(string strWhere)
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append("select count(1) FROM SO_SOMain ");
            if (strWhere.Trim() != "")
            {
                strSql.Append(" where " + strWhere);
            }
            object obj = DbHelperSQL.GetSingle(strSql.ToString());
            if (obj == null)
            {
                return 0;
            }
            else
            {
                return Convert.ToInt32(obj);
            }
        }
        /// <summary>
        /// 分页获取数据列表
        /// </summary>
        public DataSet GetListByPage(string strWhere, string orderby, int startIndex, int endIndex)
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append("SELECT * FROM ( ");
            strSql.Append(" SELECT ROW_NUMBER() OVER (");
            if (!string.IsNullOrEmpty(orderby.Trim()))
            {
                strSql.Append("order by T." + orderby);
            }
            else
            {
                strSql.Append("order by T.ID desc");
            }
            strSql.Append(")AS Row, T.*  from SO_SOMain T ");
            if (!string.IsNullOrEmpty(strWhere.Trim()))
            {
                strSql.Append(" WHERE " + strWhere);
            }
            strSql.Append(" ) TT");
            strSql.AppendFormat(" WHERE TT.Row between {0} and {1}", startIndex, endIndex);
            return DbHelperSQL.Query(strSql.ToString());
        }

        /*
		/// <summary>
		/// 分页获取数据列表
		/// </summary>
		public DataSet GetList(int PageSize,int PageIndex,string strWhere)
		{
			SqlParameter[] parameters = {
					new SqlParameter("@tblName", SqlDbType.VarChar, 255),
					new SqlParameter("@fldName", SqlDbType.VarChar, 255),
					new SqlParameter("@PageSize", SqlDbType.Int),
					new SqlParameter("@PageIndex", SqlDbType.Int),
					new SqlParameter("@IsReCount", SqlDbType.Bit),
					new SqlParameter("@OrderType", SqlDbType.Bit),
					new SqlParameter("@strWhere", SqlDbType.VarChar,1000),
					};
			parameters[0].Value = "SO_SOMain";
			parameters[1].Value = "ID";
			parameters[2].Value = PageSize;
			parameters[3].Value = PageIndex;
			parameters[4].Value = 0;
			parameters[5].Value = 0;
			parameters[6].Value = strWhere;	
			return DbHelperSQL.RunProcedure("UP_GetRecordByPage",parameters,"ds");
		}*/

        #endregion  BasicMethod
        #region  ExtensionMethod

        #endregion  ExtensionMethod
    }
}

